The present application relates to markup language documents, and more particularly to the formatting of markup language documents.
Markup language documents contain content interspersed with markup language or tags. The markup language may be used to structure and define the content, as well as to format the content for display. For example, a Hypertext Markup Language (HTML) document may contain tags like <head> and <body> that organize the document's content into sections (in this case, a header section and a body section), as well as tags like <b> that cause content to be rendered or displayed in a certain manner (in this case, using boldface font).
Style sheets may be used in conjunction with markup language documents in order to help separate the functions of structuring and formatting the documents. Style sheets contain formatting descriptions that may be used to determine how certain elements or sections of a markup language document are to be displayed. For example, style sheets may be used to specify the font, color, and positioning of content in a markup language document. Thus, some of the formatting tags and functionality in a markup language document may be replaced by formatting instructions included in one or more style sheets. In the case of HTML documents, style sheets may work in conjunction with HTML tags to describe in more detail how the content in the documents is to be displayed.
By helping to collect formatting descriptions in a central location (e.g., in one or more files), style sheets may make it easier to modify and revise the formatting of markup language documents. However, markup language documents may require numerous formatting instructions, which may be stored in numerous style sheets, and it may be difficult and burdensome to edit extensive or multiple style sheets in a consistent manner. For example, if an organization wishes to change the text color on all pages on a certain portion of its web site, the style sheets that apply to those pages may have to be identified, and the appropriate color settings may have to be adjusted in all of those style sheets.
One approach that may make it easier to modify style sheets in a consistent manner is to parametrize the style sheets. A parametrized representation of a style sheet may contain one or more design parameters or variables, each of which may be set to or associated with a specific value or set of values. The parametrized representation of a style sheet may be used to generate the actual style sheet that is applied to a markup language document. The generated style sheet may contain multiple formatting instructions that either make use of, or that are based on, the values of the parameters. A formatting change may be effected by revising the value of a parameter in the parametrized representation of a style sheet, and regenerating the style sheet from the parametrized representation. The revised value of the parameter may be reflected in all of the formatting instructions in the style sheet that are based on the parameter.